import turtle

# turtle.goto(100, 200)
# 设置x坐标
turtle.setx(100)
# 设置y坐标
turtle.sety(200)
print(turtle.position())
# 获取x坐标
print(turtle.xcor())
# 获取y坐标
print(turtle.ycor())

def press():
    print('aaaa')

def click(x,y):
    print(x, y)
# 设置键盘按下某个按键的事件
turtle.onkeypress(press, 'a')
# 开始监听
turtle.listen()
# 监听鼠标点击事件
turtle.onscreenclick(click, 1)
turtle.done()